package com.aier.bean.forwarder;

import com.aier.bean.common.FieldDescription;
import com.aier.utils.LocalDateConverter;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 货代bean
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("freight_forwarder")
@HeadStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
@ColumnWidth(15)
public class FreightForwarder {
    @TableField("forwarder_id")
    @ExcelProperty("货代id")
    @FieldDescription("货代id")
    private Integer forwarderId;

    @TableField("fba_code")
    @ExcelProperty(value = "FBA码")
    @FieldDescription("FBA码")
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    public String fbaCode;

    @ExcelProperty("仓库编码")
    @FieldDescription("仓库编码")
    @TableField("warehouse_code")
    private String warehouseCode;

    @ExcelProperty("货代")
    @FieldDescription("货代")
    @TableField("forwarder_code")
    private String forwarderCode;

    /** 该字段准备废弃，可先不管 **/
    @ExcelProperty("货代简称")
    @FieldDescription("货代简称")
    @TableField("forwarder_acronyms")
    private String forwarderAcronyms;

    @ExcelProperty("仓库地址")
    @FieldDescription("仓库地址")
    @TableField("destination")
    private String destination;

    @ExcelProperty("包税价(￥/kg)")
    @FieldDescription("包税价(￥/kg)")
    @TableField("tax_inclusive_price")
    private BigDecimal taxInclusivePrice;

    @ExcelProperty("自税价格(￥/方)")
    @FieldDescription("自税价格(￥/方)")
    @TableField("self_faxed_price")
    private BigDecimal selfFaxedPrice;

    @ExcelProperty("运输渠道")
    @FieldDescription("运输渠道")
    @TableField("transport_channel")
    private String transportChannel;

    @ExcelProperty(value = "报价日期",converter = LocalDateConverter.class)
    @FieldDescription("报价日期")
    @TableField("quote_date")
    private LocalDate quoteDate;

    @ExcelProperty("产品sku")
    @FieldDescription("产品sku")
    @TableField("sku")
    private String sku;

    @ExcelProperty("询价人")
    @FieldDescription("询价人")
    @TableField("staff_name")
    private String staffName;
}
